package com.me.obj {

	public class oObject {

		public function oObject() {

		}

		/**
		 * 填充对象
		 *
		 * @param _src 属性值列表
		 *
		 * @param _dest 对象
		 *
		 * @param _properties 对象属性
		 */
		public static function list(_src:Array, _dest:Object, _properties:Array):void {
			if (!_src || !_properties) {
				throw(new Error("list方法的第一个和第三个参数不能为null或undefined！"));
			}
			var _proSize:int = _properties.length;
			var _proIndex:int = 0;
			while (_proIndex < _proSize) {
				_dest[_properties[_proIndex]] = _src[_proIndex];
				_proIndex++;
			}
		}

		/**
		 * 获取指定目标的键值
		 *
		 * @param _target 目标
		 *
		 */
		public static function getKeys(_target:Object):Array {
			var _key:Object;
			var _returnKey:Array = [];
			for (_key in _target) {
				_returnKey.push(_key);
			}
			return (_returnKey);
		}

		/**
		 * 获取指定目标的值
		 *
		 * @param _target 目标
		 *
		 */
		public static function getValues(_target:Object):Array {
			var _key:Object;
			var _values:Array = [];
			for (_key in _target) {
				_values.push(_target[_key]);
			}
			return (_values);
		}

	}

}
